package lec10.pm;
public class SimpleThread2 implements Runnable{
	public SimpleThread2(String str) {
		this.str=str;
	}
    String str;
    
    public void run() {
        for (int i = 0; i < 8; i++) {
            System.out.println(i + " " + getName());
            try {
                Thread.sleep((long)(Math.random() * 1000));
            } catch (InterruptedException e) {}
        }
        System.out.println("DONE! " + getName());
    }

	private String getName() {
		return str;
	}
}